<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp">

    <link href="/system/common/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/system/common/libs/bootstrap/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/system/common/custom/css/common.css">
    <link rel="stylesheet" type="text/css" href="/frame/index/css/home.css">
    <link rel="stylesheet" type="text/css" href="/frame/css/primary.css" class="css-href"/>
    <script src="/system/common/libs/js/jquery.min.js"></script>
    <script src="/system/common/custom/js/common.js"></script>
    <!--以上内部不能动,以下为你自己的控件引入的内容-->
    <!--自定义控件css和js-->
    <script src="/system/common/libs/layer/layer.js"></script>
    <script src="/system/common/libs/js/echarts.min.js"></script>
    <script src="/system/common/libs/artTemplate/art-template.js"></script>
    <script src="/system/common/libs/js/handlebars.js"></script>
    <script src="/system/common/custom/js/tab-operation.js"></script>
    <script src="/system/common/widget/x_panel/x_panel.js"></script>
    <script src="/system/common/custom/js/frameEvent.js"></script>
    <script src="/system/common/custom/js/framework.js"></script>
    <script src="/system/common/custom/js/globalApi.js"></script>
</head>
<body>
<!--<div class="word-desk clearfix">-->
    <!--<div class="layout-left clearfix">-->
        <!--<div class="head-portrait layout-left">-->
            <!--<img src="https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png" alt="头像" title="头像">-->
        <!--</div>-->
        <!--<div class="user-information layout-right">-->
            <!--<div class="user-information-greet">-->
                <!--欢迎你，<span id="userName"></span>，祝你开心每一天！-->
            <!--</div>-->
            <!--<div class="user-information-base" id="login-dept">-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
    <!--&lt;!&ndash;<div class="layout-right user-tips">&ndash;&gt;-->
        <!--&lt;!&ndash;<ul>&ndash;&gt;-->
            <!--&lt;!&ndash;<li>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="user-tips-title">待办任务</div>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="user-tips-num" id="dbNum">0</div>&ndash;&gt;-->
            <!--&lt;!&ndash;</li>&ndash;&gt;-->
            <!--&lt;!&ndash;<li>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="user-tips-title">我的消息</div>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="user-tips-num" id="msgNum">0</div>&ndash;&gt;-->
            <!--&lt;!&ndash;</li>&ndash;&gt;-->
        <!--&lt;!&ndash;</ul>&ndash;&gt;-->
    <!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--</div>-->
<!--<div class="panel-container rowbox" style="margin-top: 0;margin-right: 10px;background: url(./imges/index-bg.png) no-repeat center;height: 200px">-->
<!--</div>-->
<!--<div class="panel-container" style="margin-top: 10px">-->
    <!--<div class="row row_left" style="margin-bottom: 10px;margin-right: 10px">-->
        <!--<p class="panel-title panel-title-fast">-->
            <!--<i class="fa fa-flag" aria-hidden="true" ></i>-->
            <!--&nbsp;-->
            <!--快捷入口-->
        <!--</p>-->
        <!--<div class="fasebox">-->
            <!--<div class="row_fast">-->
                <!--<div class="backlog-panel-icon" id="project-lx" data-title="项目申报" data-url="yxProjectList" data-action="add">-->
                    <!--<span class="icon fa fa-file-text entrance-icon"></span>-->
                    <!--<p class="entrance-text">-->
                        <!--项目申报-->
                    <!--</p>-->

                <!--</div>-->
            <!--</div>-->
            <!--<div class="row_fast">-->
                <!--<div class="backlog-panel-icon" id="project-tz"  data-title="项目台账" data-url="yxProjectBook">-->
                    <!--<span class="icon fa fa-archive entrance-icon"></span>-->
                    <!--<p class="entrance-text">-->
                        <!--项目台账-->
                    <!--</p>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="fasebox">-->

            <!--<div class="row_fast">-->
                <!--<div class="backlog-panel-icon" id="project-ht"  data-title="合同台账" data-url="yxContract">-->
                    <!--<span class="icon fa fa-desktop entrance-icon"></span>-->
                    <!--<p class="entrance-text">-->
                        <!--合同台账-->
                    <!--</p>-->
                <!--</div>-->
            <!--</div>-->
            <!--&lt;!&ndash;<div class="row_fast">&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="backlog-panel-icon" id="project-zc"  data-title="政策文件" data-url="yxPlicyRule">&ndash;&gt;-->
                    <!--&lt;!&ndash;<span class="icon fa fa-file entrance-icon"></span>&ndash;&gt;-->
                    <!--&lt;!&ndash;<p class="entrance-text">&ndash;&gt;-->
                        <!--&lt;!&ndash;政策文件&ndash;&gt;-->
                    <!--&lt;!&ndash;</p>&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
            <!--&lt;!&ndash;</div>&ndash;&gt;-->
            <!--&lt;!&ndash;<div class="row_fast">&ndash;&gt;-->
            <!--&lt;!&ndash;<div class="backlog-panel-icon" id="project-jc"  data-title="组织管理" data-url="sysOrgTree">&ndash;&gt;-->
            <!--&lt;!&ndash;<span class="icon fa fa-user entrance-icon"></span>&ndash;&gt;-->
            <!--&lt;!&ndash;<p class="entrance-text">&ndash;&gt;-->
            <!--&lt;!&ndash;组织管理&ndash;&gt;-->
            <!--&lt;!&ndash;</p>&ndash;&gt;-->
            <!--&lt;!&ndash;</div>&ndash;&gt;-->
            <!--&lt;!&ndash;</div>&ndash;&gt;-->
            <!--<div class="row_fast">-->
                <!--<div class="backlog-panel-icon" id="project-tj" data-title="统计分析" data-url="dataAnalysis.html">-->
                    <!--<span class="fa fa-area-chart entrance-icon"></span>-->
                    <!--<p class="entrance-text">-->
                        <!--统计分析-->
                    <!--</p>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
    <!--&lt;!&ndash;<div class="row">&ndash;&gt;-->
        <!--&lt;!&ndash;<div class="col-sm-6 col-md-6 col-lg-6" >&ndash;&gt;-->
            <!--&lt;!&ndash;<div class="backlog-panel"  style="background-color: white;padding: 8px">&ndash;&gt;-->
                <!--&lt;!&ndash;<div id="projectNum"  class="backlog-panel" style="padding-bottom: 20px">&ndash;&gt;-->

                <!--&lt;!&ndash;</div>&ndash;&gt;-->
            <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;<div class="col-sm-6 col-md-6 col-lg-6" >&ndash;&gt;-->
            <!--&lt;!&ndash;<div class="backlog-panel"  style="background-color: white;padding: 8px">&ndash;&gt;-->
                <!--&lt;!&ndash;<div id="projectTg"  class="backlog-panel" style="padding-bottom: 20px">&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
            <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;</div>&ndash;&gt;-->
    <!--&lt;!&ndash;</div>&ndash;&gt;-->
    <!--&lt;!&ndash;<div class="row row_right">&ndash;&gt;-->
        <!--&lt;!&ndash;<div class="row_line">&ndash;&gt;-->
            <!--&lt;!&ndash;<div class="backlog-panel">&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="panel-head">&ndash;&gt;-->
                    <!--&lt;!&ndash;<span class="panel-title layout-left">&ndash;&gt;-->
                        <!--&lt;!&ndash;<i class="fa fa-tasks" aria-hidden="true" ></i>&ndash;&gt;-->
                        <!--&lt;!&ndash;&nbsp;&ndash;&gt;-->
                        <!--&lt;!&ndash;待办任务&ndash;&gt;-->
                    <!--&lt;!&ndash;</span>&ndash;&gt;-->
                    <!--&lt;!&ndash;<div class="layout-right x-panel-btn">&ndash;&gt;-->
                        <!--&lt;!&ndash;<span class="panel-title refesh" data-type="db" title="刷新">&ndash;&gt;-->
                            <!--&lt;!&ndash;<i class="fa fa-refresh" aria-hidden="true" ></i>&ndash;&gt;-->
                        <!--&lt;!&ndash;</span>&ndash;&gt;-->
                        <!--&lt;!&ndash;<span class="panel-title more-tasks" title="更多">&ndash;&gt;-->
                            <!--&lt;!&ndash;<i class="fa fa-mail-forward" aria-hidden="true" ></i>&ndash;&gt;-->
                        <!--&lt;!&ndash;</span>&ndash;&gt;-->
                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="backlog-container">&ndash;&gt;-->
                    <!--&lt;!&ndash;<ul class="content-items" id="tasks_stay">&ndash;&gt;-->
                    <!--&lt;!&ndash;</ul>&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
            <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;</div>&ndash;&gt;-->
    <!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--</div>-->

<!--<div class="panel-container rowbox" style="background: url(./imges/hyy_bg.jpg) no-repeat center;">-->
    <!--<div class="row_line smallrigt">-->
        <!--<div class="news-panel">-->
            <!--<div class="panel-head">-->
                    <!--<span class="panel-title layout-left">-->
                        <!--<i class="fa fa-bell" aria-hidden="true" ></i>-->
                        <!--&nbsp;-->
                        <!--消息通知-->
                    <!--</span>-->
                <!--<div class="layout-right x-panel-btn">-->
                        <!--<span class="panel-title refesh" data-type="msg">-->
                          <!--<i class="fa fa-refresh" aria-hidden="true" title="刷新"></i>-->
                        <!--</span>-->
                    <!--<span class="panel-title more-message">-->
                            <!--<i class="fa fa-mail-forward " aria-hidden="true" title="更多"></i>-->
                        <!--</span>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="news-container">-->
                <!--<ul class="content-items" id="my_msg">-->

                <!--</ul>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
    <!--<div  class="row_line">-->
        <!--<div class="message-panel">-->
            <!--<div class=" panel-head">-->
                    <!--<span class="panel-title layout-left">-->
                         <!--<i class="fa fa-folder-open" aria-hidden="true" ></i>-->
                        <!--&nbsp;-->
                         <!--政策文件-->
                    <!--</span>-->
                <!--<div class="layout-right x-panel-btn">-->
                        <!--<span class="panel-title refesh" data-type="news" title="刷新">-->
                             <!--<i class="fa fa-refresh" aria-hidden="true" ></i>-->
                        <!--</span>-->
                    <!--<span class="panel-title more-news" title="更多">-->
                            <!--<i class="fa fa-mail-forward " aria-hidden="true" ></i>-->
                        <!--</span>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="message-container">-->
                <!--<ul class="content-items" id="news_notice">-->
                <!--</ul>-->
            <!--</div>-->
        <!--</div>-->

    <!--</div>-->
<!--</div>-->
</body>
<!--我的待办 模板-->
<script id="task-template" type="text/html">
    {{each rows value i}}
    <li>
        <div class="content-list clearfix">
            <div class="layout-left">
                <div class="content-label">
                    T
                </div>
            </div>
            <div class="content-details">
                <div>{{value.taskName}}</div>
                <div>{{value.createTime}}</div>
            </div>

            {{if value.taskStatus==0}}
                <div class="content-transaction layout-right taskbl" taskId="{{value.taskId}}">
                    认领
                </div>
            {{/if}}

            {{if value.taskStatus==1}}
                <div class="content-transaction layout-right" taskId="{{value.taskId}}">
                    {{if value.taskStatus==1}}
                        <span class="taskb2">办理</span>
                    {{/if}}
                    {{if value.isCanReleaseTask==1}}
                        <span class="taskb3">释放任务</span>
                    {{/if}}
                </div>
            {{/if}}
        </div>
    </li>
    {{/each}}
</script>

<!--消息通知 模板-->
<script id="message-template" type="text/html">
    {{each rows value i}}
    <li data-url="{{value.uuid}}">
        <div class="content-list clearfix">
            <div class="layout-left">
                <div class="content-label">
                    M
                </div>
            </div>
            <div class="content-details">
                <div>{{value.title}}</div>
            </div>
            <div class="content-transaction layout-right msg-view">
                {{value.addtime}}
            </div>
        </div>
    </li>
    {{/each}}
</script>
<!--政策文件 模板-->
<script id="main-template" type="text/html">
    {{each rows value i}}
    <li data-url="{{value.uuid}}">
        <div class="content-list clearfix">
            <div class="layout-left">
                <div class="content-label">
                    N
                </div>
            </div>
            <div class="content-details">
                <div>{{value.title}}</div>
            </div>
            <div class="content-transaction layout-right">
                <div>{{value.addtime}}</div>
            </div>
        </div>
    </li>
    {{/each}}
</script>
<script>
    $(function () {
        jQuery.ajax({
            url: '/system/user/userInfo.do',
            success: function (res) {
                if(res){
                    $("#userName").html(res.userName);
                    $("#login-dept").html(res.orgJoinName);
                    $("#login-username").html(res.uid);
                    $("#login-post").html(res.name);
                    $("#login-count").html(res.loginCount);
                    $("#login-time").html(res.lastLoginTime);
                }
            },
            error: function (res) {
            }
        });
        //消息请求
        function commonDeal(config){
            if(config&&config["url"]){
                //待办事项
                jQuery.ajax({
                    url: config["url"],
                    type: config["type"]||"post",
                    success: function (data) {
                        if (data) {
                            var termId = config["temId"].toString().substr(1,config["temId"].length);
                            var tmpl = template(termId, data["data"]);
                            $(config["fillTemId"]).html(tmpl);

                            if(config.dataLength==="dbData"){
                                $("#dbNum").html(data["data"]["total"])
                            }
                            if(config.dataLength==="msgData"){
                                $("#msgNum").html(data["data"]["rows"].length)
                            }
                        }
                    },
                    error: function (res) {
                        $.x_alertMsg("请求失败",1000);
                    }
                });
            }
        }

        //刷新按钮
        $(".x-panel-btn").on("click",".refesh", function () {
            var type=$(this).attr("data-type");
            loadSection(type);
        });

        // 加载区域块数据
        function loadSection(type){
            if(type=="db"){
                //待办事项
//               commonDeal({
//                   url: "/bpm/task/taskTodoList.do?page=1&rows=5",
//                   temId:"#task-template",
//                   fillTemId:"#tasks_stay",
//                   dataLength:"dbData"
//               });
                commonDeal({
                    url: "/system/common/dataList.do?source=getNewNotices",
                    temId:"#main-template",
                    type:"get",
                    fillTemId:"#tasks_stay"
                });
            }else if(type=="news"){
                //新闻公告
                commonDeal({
                    url: "/system/common/dataList.do?source=getNewNotices",
                    temId:"#main-template",
                    type:"get",
                    fillTemId:"#news_notice"
                });

            }else if(type=="msg"){
                //我的消息
                commonDeal({
                    url: "/system/common/dataList.do?source=newMsg",
                    temId:"#message-template",
                    type:"get",
                    fillTemId:"#my_msg",
                    dataLength:"msgData"
                });
            }
        }

        //首次区域加载
        loadSection("db");
        loadSection("news");
        loadSection("msg");

        // 任务认领
        $("#tasks_stay").on("click", ".taskbl", function () {
            bpmTaskClaim($(this).attr("taskId"));
        });
        // 任务办理
        $("#tasks_stay").on("click", ".taskb2", function () {
            bpmTaskHandle($(this).parent().attr("taskId"));
        });
        // //任务释放
        $("#tasks_stay").on("click", ".taskb3", function () {
            bpmTaskRelease($(this).parent().attr("taskId"));
        });

        //入口
        $(".backlog-panel-icon").on("click",function(){
            var target=$(this);
            var url=target.attr("data-url");
            var title=target.attr("data-title");
            var action=target.attr("data-action");
            if(title&&url){
                var config = {};
                config["pobj"] = "";
                var pageObj = {};
                pageObj["name"] = title;
                if(action){
                    pageObj["action"] = action;
                }else{
                    pageObj["action"] = "show";
                }
                pageObj["pageKey"] = "775821bdef5sdsd948259c6533agtessb0be29";
                pageObj["pageUrl"] = "/system/page/show.do?pageId="+url+"&pageKey=775821bdef5948259c6533agtessb0be29&module=";
                pageObj["openStyle"] = "page";

                config["page"] = pageObj;
                config["module"] = url;
                config["menuCode"] = "21";
                config["pdata"] = {busParam: {bustypeid: 20}};
                FrameWork && FrameWork.xShowDataPage(config);
            }
        });

        //新闻查看
        $("#news_notice").on("click","li", function () {
            var id = $(this).attr("data-url");
            if(id){
                var pageId, pageKey, pageTitle;

                pageId = "yxPolicyRuleShow";
                pageKey = "273d5ec1cc909f3434ab34c1c0ss8978814";
                pageTitle = "政策文件";
                var params = {
                    "pobj": "", "page": {
                        "name": pageTitle,
                        "action": "show",
                        "pageKey": pageKey,
                        "pageUrl": "/system/page/show.do?pageId=" + pageId + "&pageKey=" + pageKey + "&module=",
                        "openStyle": "page",
                        "width": "1200px",
                        "height": "600px"
                    }
                    , "menuCode": "13", "module": ""
                };

                params["dataId"] = id;
                GlobalApi.addFilter(params, "uuid", "=", id);
                FrameWork.xShowDataPage(params);
            }
        });

        //消息查看
        $("#my_msg").on("click", "li", function () {
            var dataUrl = $(this).attr("data-url");
            if(dataUrl){
                var config={
                    action:"show",
                    keyId:dataUrl,
                    page:{
                        "name":"消息通知",
                        "action":"show",
                        "pageKey":"9ffd017eed506cba98bd61d8f4fe44d1",
                        "pageUrl":"/system/page/show.do?pageId=sysMessageDetailMy&pageKey=9ffd017eed506cba98bd61d8f4fe44d1&module=",
                        "openStyle":"win",
                        "width":"400px",
                        "height":"400px"
                    }
                };

                GlobalApi.addFilter(config, "uuid", "=", dataUrl);
                FrameWork.xShowDataPage(config);
            }
        });

        //更多任务
        $(".more-tasks").on("click",function(){
            tabOperation.openTabLabel({
               // url: "/bpm/userTaskList.html",
                url: "/bpm/auto-test/taskCenter.html",
                name: "任务中心",
                id: "taskCenter"
            });
        });

        //更多新闻
        $(".more-news").on("click",function(){
            var config = {};
            config["pobj"] = "";
            var pageObj = {};
            pageObj["name"] = "行业规范";
            pageObj["action"] = "show";
            pageObj["pageKey"] = "775821bdef5948259c6533agtessb0be29";
            pageObj["pageUrl"] = "/system/page/show.do?pageId=yxPlicyRule&pageKey=775821bdef5948259c6533agtessb0be29&module=";
            pageObj["openStyle"] = "page";

            config["page"] = pageObj;
            config["module"] = "yxPlicyRule";
            config["menuCode"] = "21";
            config["pdata"] = {busParam: {bustypeid: 20}};
            FrameWork && FrameWork.xShowDataPage(config);
        });

        //更多消息
        $(".more-message").on("click",function(){
            window.tabOperation.openTabLabel({
                url: "/system/page/show.do?pageId=sysMessageListMy&module="
                , name: '我的消息', id: "myMessage"
            });
        });

        //打开个人中心
        $('.user-center').on('click', function () {
            window.tabOperation.openTabLabel({
                url: '/frame/index/subpage/userinfo.html',
                name: "个人中心",
                id: "1045"
            });
        });


        //认领
        function bpmTaskClaim(taskId){
            GlobalApi.confirmMsg("确定要认领该任务吗？",function(){
                    var flag = true;
                    if(flag){
                        GlobalApi.commonAjax({
                                url:"/bpm/task/taskClaim.do",
                                type:"post",
                                data:{
                                    "taskId":taskId
                                },
                                success:function(ret){
                                    if(ret.status == 1){
                                        // 刷新待办列表
                                        loadSection("db");
                                        GlobalApi.alertMsg("认领成功!");
                                    }
                                    else{
                                        GlobalApi.alertMsg("认领失败!" + ret.message, 2);
                                    }
                                    flag = true;
                                }
                            }
                        );
                    }
                }
            );
        }

        //办理
        function bpmTaskHandle(taskId) {
            //任务ID
            GlobalApi.commonAjax({
                    //获取待办、已办任务详情
                    url: "/bpm/task/getBpmTaskDetail.do",
                    type: "get",
                    data: {
                        "taskId": taskId
                    },
                    success: function (ret) {
                        if (ret.status == 1) {
                            //moduleId
                            moduleId = ret.data["moduleId"];
                            //业务数据id
                            dataId = ret.data["dataId"];
                            //表单页面ID
                            pageId = ret.data["pageId"];
                            var bpmHandlePage = {
                                "pobj": "", "page": {
                                    "name": "任务办理",
                                    "action": "show",
                                    "pageKey": "100000001",
                                    "pageUrl": "/system/page/show.do?pageId=" + pageId + "&pageKey=100000001&module=",
                                    "openStyle": "page"
                                }
                                , "menuCode": "13", "module": "" + moduleId
                            };
                            bpmHandlePage["dataId"] = dataId;
                            bpmHandlePage["pageId"] = pageId;
                            bpmHandlePage["taskId"] = taskId;
                            if (GlobalApi.isEmpty(bpmHandlePage["dataId"])) {
                                GlobalApi.alertMsg("信息有误，请检查后在操作！", 2);
                                return false;
                            }
                            bpmHandlePage["page"]["name"] = "任务办理";
                            GlobalApi.addFilter(bpmHandlePage, "uuid", "=", dataId);
                            FrameWork.xShowDataPage(bpmHandlePage);
                        }
                        else {
                            GlobalApi.alertMsg("获取已办任务详情失败!" + ret.message, 2);
                        }
                    }
                }
            );
        }

        //释放任务
        function bpmTaskRelease(taskId){
            GlobalApi.confirmMsg("确定要释放该任务吗？",function(){
                    var flag = true;
                    if(flag){
                        GlobalApi.commonAjax({
                                url:"/bpm/task/releaseTask.do",
                                type:"post",
                                data:{
                                    "taskId":taskId
                                },
                                beforeSend:function(){
                                    flag = false;
                                },
                                success:function(ret){
                                    if(ret.status == 1){
                                        // 刷新待办列表
                                        loadSection("db");
                                        GlobalApi.alertMsg("是否任务成功!");
                                    }
                                    else{
                                        GlobalApi.alertMsg("释放任务失败!" + ret.message, 2);
                                    }
                                    flag = true;
                                }
                            }
                        );
                    }
                }
            );
        }

    })

//    projectNum();
//    projectTg();
    function projectNum() {
        var projectNum = echarts.init($("#projectNum")[0],"macarons");
        var option = {
            color: ['#4e97d9'],
            title : {
                text: '项目立项',
                textStyle:{
                    color:'#4e97d9',        //颜色
                    fontStyle:'normal',     //风格
                    fontWeight:'normal',    //粗细
                    fontFamily:'Microsoft yahei',   //字体
                    fontSize:14,     //大小
                    align:'center'   //水平对齐
                },
                subtext:'本年度',      //副标题
                subtextStyle:{          //对应样式
                    color:'#D48089',
                    fontSize:12
                }
            },

            tooltip : {
                trigger: 'axis'
            },
            legend: {
                orient : 'horizontal',
                x : 'center',
                y : 'bottom',
                data:['项目数量']
            },
            calculable : true,
            xAxis : [
                {
                    type : 'category',
                    data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    name:'数量',
                    type:'bar',
                    data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
                    markPoint : {
                        data : [
                            {type : 'max', name: '最大值'},
                            {type : 'min', name: '最小值'}
                        ]
                    },
                    markLine : {
                        data : [
                            {type : 'average', name: '平均值'}
                        ]
                    }
                }
            ]
        };
        projectNum.setOption(option);
    }
    function projectTg() {
        var projectTg = echarts.init($("#projectTg")[0],"macarons");
        var option = {
            title : {
                text: '项目情况',
                textStyle:{
                    color:'#1388D2',        //颜色
                    fontStyle:'normal',     //风格
                    fontWeight:'normal',    //粗细
                    fontFamily:'Microsoft yahei',   //字体
                    fontSize:14,     //大小
                    align:'center'   //水平对齐
                },
                subtext:'本年度',      //副标题
                subtextStyle:{          //对应样式
                    color:'#D48089',
                    fontSize:12
                }
            },

            color: ['#4e97d9','#5cb85c','#8FB3C6','#d9534f'],
            tooltip : {
                trigger: 'item',
                formatter: "{a} <br/>{b} : {c} ({d}%)"
            },
            legend: {
                orient : 'horizontal',
                x : 'center',
                y : 'bottom',
                data:['立项项目','进行中的项目','完成的项目','终止的项目']
            },
            calculable : true,
            series : [
                {
                    name:'项目数量',
                    type:'pie',
                    radius : ['50%', '70%'],
                    itemStyle : {
                        normal : {
                            label : {
                                show : false
                            },
                            labelLine : {
                                show : false
                            }
                        },
                        emphasis : {
                            label : {
                                show : true,
                                position : 'center',
                                textStyle : {
                                    fontSize : '14',
                                    fontWeight : 'bold'
                                }
                            }
                        }
                    },
                    data:[
                        {value:335, name:'立项项目'},
                        {value:310, name:'进行中的项目'},
                        {value:50, name:'完成的项目'},
                        {value:10, name:'终止的项目'}
                    ]
                }
            ]
        };

        projectTg.setOption(option);
    }

</script>
</html>